package org.infodavid.common.model.impl.criteria;

import org.infodavid.common.model.criteria.IUserSessionCriteria;
import org.infodavid.common.model.impl.criteria.SortCriteriaImpl;

/**
 * The Class UserSessionCriteriaImpl.
 */
public class UserSessionCriteriaImpl extends SortCriteriaImpl implements IUserSessionCriteria {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -5781804069003150073L;

	/** The user key. */
	private Long userKey = null;

	private Boolean expired = null;

	/**
	 * The Constructor.
	 */
	public UserSessionCriteriaImpl() {
		super();
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IUserSessionCriteria#getUserKey()
	 */
	public Long getUserKey() {
		return userKey;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IUserSessionCriteria#setUserKey(java.lang.Long)
	 */
	public void setUserKey(final Long value) {
		userKey = value;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IUserSessionCriteria#isExpired()
	 */
	public Boolean isExpired() {
		return expired;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IUserSessionCriteria#setExpired(java.lang.Boolean)
	 */
	public void setExpired(final Boolean flag) {
		expired = flag;
	}

	/*
	 * See super class or interface. (non-Javadoc)
	 * @see org.infodavid.common.services.impl.SearchCriteriaImpl#toString()
	 */
	@Override
	public String toString() {
		final StringBuilder builder = new StringBuilder();

		builder.append(super.toString());
		builder.append("[userKey=");
		builder.append(userKey);
		builder.append(", expired=");
		builder.append(expired);
		builder.append("]");

		return builder.toString();
	}
}
